package com.kingyun.gpsinspection.purificationservice.facade.service.tdm;


import com.kingyun.gpsinspection.purificationservice.facade.model.jsm.EmployeeVo;
import com.kingyun.gpsinspection.purificationservice.facade.model.jsm.RedisValue;
import com.kingyun.gpsinspection.purificationservice.facade.model.tdm.*;

/**
 * 危害因素辨识业务层
 * Created by sugongche on 2016/2/6.
 */
public interface HazardIdentificationService {
    /**
     * 保存信息
     *
     * @param redisValue
     * @param employeeVo
     * @param hazardIdentification
     * @param hazard
     * @param taskRelation
     * @return
     */
    int save(RedisValue redisValue, EmployeeVo employeeVo, HazardIdentification hazardIdentification, Hazard hazard, String uploadFiles, String deletedFiles, TaskRelation taskRelation);

    /**
     * 更新信息
     *
     * @param redisValue
     * @param employeeVo
     * @param hazardIdentification
     * @param hazard
     * @param uploadFiles
     * @param deletedFiles
     * @return
     * @throws Exception
     */
    int update(RedisValue redisValue, EmployeeVo employeeVo, HazardIdentification hazardIdentification, Hazard hazard, TaskLink taskLink, String uploadFiles, String deletedFiles);

    /**
     * 根据ID查询对象
     * @param hazardIdentificationId
     * @return
     * @throws Exception
     */
    HazardIdentification queryBeanById(String hazardIdentificationId) throws Exception;

    /**
     * 根据ID查询封装对象
     * @return
     */
    HazardIdentificationVo findVoById(String id) throws Exception;

    /**
     * 根据流程实例ID查询对象
     * @param piPiid
     * @return
     */
    HazardIdentificationVo findByPiPiid(String piPiid);

    /**
     * 根据审核保存信息
     *
     *
     * @param redisValue
     * @param employeeVo
     * @param taskLink
     * @param hazardIdentification
     * @return
     */
    int saveByAudit(RedisValue redisValue, EmployeeVo employeeVo, TaskLink taskLink, HazardIdentification hazardIdentification) throws Exception;


    /**
     * 根据现场操作步骤保存信息
     *
     *
     * @param redisValue
     * @param employeeVo
     * @param hazardIdentification
     * @param taskLink
     * @return
     */
    int saveByStep(RedisValue redisValue, EmployeeVo employeeVo, HazardIdentification hazardIdentification, TaskLink taskLink);

}
